<%@ page language="java" import="com.bifrii.bo.*,com.bifrii.transferObjects.*,com.bifrii.dao.*,java.util.*" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<jsp:include page="/header.jsp" />

<% 
		List<Event> events = EventManager.getInstance().getAllEvents() ;
		List<Event> top= EventManager.getInstance().getTopEvents();
%>

<div id="content-left">
<%
	for(Event e: events)
	{
%>
	<div class="box">
		<div class="title"><a href="FrontController?res=indexEvent.jsp&id=<%=e.getIdEvent()%>"><%=e.getName()%></a></div>
		<div class="description"><%=e.getDescription()%></div>
		<div class="info"></div>
	</div>
<%			
	}
%>
</div>
<div id="content-right">
	<div class="module">
		<div class="module-title">Eventos populares</div>
		<div class="module-content">
		<ul>
			<%
				for(Event etop: top)
				{
			%>
					<li><a href="FrontController?res=indexEvent.jsp&id=<%=etop.getIdEvent()%>"><%=etop.getName()%></a></li>
			<%
				}
			%>
		</ul>
		</div>
	</div>
</div>
<jsp:include page="/footer.html" />